import Vue from 'vue'
import App from './App'
import './common/icon/iconfont.css'

Vue.config.productionTip = false
Vue.prototype.checkLogin = function(backPage, backType) {
  let userPhone = uni.getStorageSync('userPhone')
  if(userPhone == '') {
    uni.showModal({
      title: '登录提示',
      content: '该操作需登录，是否登录农乎？',
      success: function (res) {
          if (res.confirm) {
            uni.navigateTo({
              url: '/pagesB/login/login?backpage=' + backPage + '&backtype='+ backType
            })
          } else if (res.cancel) {
            return false
          }
      }
    })
  }
  return userPhone
}
App.mpType = 'app'

const app = new Vue({
  ...App
})
app.$mount()
